home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: netcom.com!milod
- From: milod@netcom.com (John DiCamillo)
- Subject: Re: Is this a memory leak?
- Message-ID: <milodDpEs3s.HBJ@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- References: <4jv214$gv7@insosf1.netins.net> <4k02v5$tu7@grimsel.zurich.ibm.com> <4k2vku$s82@werple.net.au> <4k39f5$lhn@grimsel.zurich.ibm.com>
- Date: Fri, 5 Apr 1996 21:38:16 GMT
- Sender: milod@netcom16.netcom.com
-
- wgk@zurich.ibm.com (Keith Whittingham) writes:
- >In <4k2vku$s82@werple.net.au>, davidw@werple.net.au (David White) writes:
- >>wgk@zurich.ibm.com (Keith Whittingham) writes:
-
- >ME>>The dto, ~TopClass, is a going to try and free some memory at the address
- >ME>>0x000 but, by a quirk of implmentation, will probably not blow up (as a
- >ME>>simple call to free(0) would). Instead the compiler probably generates
- >ME>>code to check that the object address is 0, it so there is no deallocation
- >ME>>of the memory.
-
- >>The use of 0 as a pointer is not the address 0x000. It is a null pointer
- >>as defined by the language. Implementations are not even required to use a
- >>bit pattern of all zeroes as a null pointer. They can use any value they
- >>like, as long as it will not also be used as a real address. Furthermore,
- >>rather than being a quirk of implementation, the language guarantees that
- >>deleting a null pointer will do nothing.
-
- >Er, I don't think I agree.
-
- Fine. Be wrong. Hint: Try reading the standard.
-
- --
- ciao,
- milo
- ================================================================
- John DiCamillo Fiery the Angels Fell
- milod@netcom.com Deep thunder rode around their shores
-